import { IsEnum, IsOptional, IsString } from 'class-validator';
import { IsPhoneNumberCustom } from 'src/shared/utils/custom.validator';

export enum StoreRole {
  // 顾客角色
  USER = 'USER',
  // 门店店长
  STORE_MANAGER = 'STORE_MANAGER',
  // 服务人员
  SERVICE = 'SERVICE',
}

export class UpdateRolesDto {
  @IsEnum(StoreRole)
  @IsOptional()
  role?: StoreRole;

  @IsString()
  @IsOptional()
  realname?: string;

  @IsPhoneNumberCustom()
  @IsOptional()
  phone?: string;
}
